<!-- src/App.vue -->
<template>
  <div class="app">
    <nav class="nav-menu">
      <router-link to="/matching-game" class="nav-link">连连看</router-link>
      <router-link to="/candy-crush" class="nav-link">消消乐</router-link>
      <router-link to="/tank-game" class="nav-link">坦克大战</router-link>
    </nav>
    <router-view></router-view>
  </div>
</template>

<script setup lang="ts">
// 路由视图会自动处理组件的渲染
</script>

<style>
.app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  text-align: center;
  color: #2c3e50;
  margin-top: 20px;
}

.nav-menu {
  margin-bottom: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.nav-link {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 10px;
  color: #2c3e50;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: #e9ecef;
}

.router-link-active {
  background: #007bff;
  color: white;
}

.router-link-active:hover {
  background: #0056b3;
}
</style>